<?php
namespace Home\Model;
use Think\Model;

class PostModel extends Model {
    // 自动验证设置
    protected $_validate = array(
        array('title','require','标题必须！',1),
        array('content','require','内容必须'),
        array('title','','标题已经存在',0,'unique',self::MODEL_INSERT),
    );

    // 自动填充设置
    protected $_auto = array(
        array('create_time','datetime',self::MODEL_INSERT,'function'),
    );

}